# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: robertfoster

pkgname=libchardet
pkgver=1.0.6
pkgrel=1
pkgdesc="Mozilla's Universal Charset Detector C/C++ API"
arch=('loong64' 'x86_64')
license=('MPL')
url="http://ftp.oops.org/pub/oops/libchardet"
depends=('gcc-libs' 'bash')
source=("https://github.com/Joungkyun/libchardet/archive/$pkgver/$pkgname-$pkgver.tar.gz")
b2sums=('bd774481811fb57bbe6d517fbd843b4c9ca4367b9ccb4eab98343d8e60191460d52763250b20760c183a057523313db8b9f94c99fad5f625a9259155235975d1')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-static
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
